//
//  SmallDecisionsMhCell.m
//  SmallDecisions
//
//  Created by 李付雄 on 2025/8/20.
//

#import "SmallDecisionsMhCell.h"

@implementation SmallDecisionsMhCell
- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if(self) {
        self.backgroundColor = [UIColor clearColor];
        self.contentView.backgroundColor = [UIColor clearColor];
        [self createCellSubviewsUI];
    }
    
    return self;
}
- (void)layoutSubviews {
    [super layoutSubviews];
    [self.mhImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.bottom.top.mas_offset(0);
    }];
    
    [self.mhLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.bottom.top.mas_offset(0);
    }];
}

- (void)createCellSubviewsUI {
    UIImageView *mhImageView = [[UIImageView alloc] init];
    mhImageView.contentMode = UIViewContentModeScaleAspectFit;
    mhImageView.image = [UIImage imageNamed:@"mh_img"];
    [self.contentView addSubview:mhImageView];
    self.mhImageView = mhImageView;
    
    UILabel *mhLabel = [[UILabel alloc] init];
    mhLabel.font = SmallDecisionsSetBoldFontSize(20);
    mhLabel.textAlignment = 1;
    mhLabel.hidden = YES;
    mhLabel.textColor = SmallDecisionsThemeFontColor;
    [self.contentView addSubview:mhLabel];
    self.mhLabel = mhLabel;
}

@end
